From f50450485cfc71c312f2f2aacc21826e19452806 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 25 May 2021 19:13:46 +0100 Subject: [PATCH] docs: Add missing documentation on Windows The gtk_print_run_page_setup_dialog() function, and its asynchronous variant, are declared in the common gtkprintoperation.h header, but implemented in different source files depending on the platform. --- gtk/gtkprintoperation-win32.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gtk/gtkprintoperation-win32.c b/gtk/gtkprintoperation-win32.c index 13937ad9bd..8fb2ac6c07 100644 --- a/gtk/gtkprintoperation-win32.c +++ b/gtk/gtkprintoperation-win32.c @@ -2064,6 +2064,23 @@ _gtk_print_operation_platform_backend_resize_preview_surface (GtkPrintOperation /* TODO: Implement */ } +/** + * gtk_print_run_page_setup_dialog: + * @parent: (nullable): transient parent + * @page_setup: (nullable): an existing `GtkPageSetup` + * @settings: a `GtkPrintSettings` + * + * Runs a page setup dialog, letting the user modify the values from + * @page_setup. If the user cancels the dialog, the returned `GtkPageSetup` + * is identical to the passed in @page_setup, otherwise it contains the + * modifications done in the dialog. + * + * Note that this function may use a recursive mainloop to show the page + * setup dialog. See gtk_print_run_page_setup_dialog_async() if this is + * a problem. + * + * Returns: (transfer full): a new `GtkPageSetup` + */ GtkPageSetup * gtk_print_run_page_setup_dialog (GtkWindow *parent, GtkPageSetup *page_setup, @@ -2196,6 +2213,21 @@ gtk_print_run_page_setup_dialog (GtkWindow *parent, return page_setup; } +/** + * gtk_print_run_page_setup_dialog_async: + * @parent: (nullable): transient parent + * @page_setup: (nullable): an existing `GtkPageSetup` + * @settings: a `GtkPrintSettings` + * @done_cb: (scope async): a function to call when the user saves + * the modified page setup + * @data: user data to pass to @done_cb + * + * Runs a page setup dialog, letting the user modify the values from @page_setup. + * + * In contrast to gtk_print_run_page_setup_dialog(), this function returns after + * showing the page setup dialog on platforms that support this, and calls @done_cb + * from a signal handler for the ::response signal of the dialog. + */ void gtk_print_run_page_setup_dialog_async (GtkWindow *parent, GtkPageSetup *page_setup, -- 2.30.2